package org.yu.team2023.flashdays.blockentity;

import net.minecraft.core.BlockPos;
import net.minecraft.world.InteractionHand;
import net.minecraft.world.InteractionResult;
import net.minecraft.world.entity.player.Player;
import net.minecraft.world.inventory.MenuType;
import net.minecraft.world.level.Level;
import net.minecraft.world.level.block.Block;
import net.minecraft.world.level.block.entity.BlockEntityType;
import net.minecraft.world.level.block.state.BlockState;
import net.minecraft.world.phys.BlockHitResult;
import org.jetbrains.annotations.Nullable;
import org.yu.team2023.flashdays.ModBlockEntities;
import org.yu.team2023.flashdays.registries.IMenuEntityBlock;

public class TreasureUpgradeBlock extends Block implements IMenuEntityBlock<TreasureUpgradeEntity> {
    public TreasureUpgradeBlock(Properties pProperties) {
        super(pProperties);
    }

    @Override
    public InteractionResult use(BlockState pState, Level pLevel, BlockPos pPos, Player pPlayer, InteractionHand pHand, BlockHitResult pHit) {
        return IMenuEntityBlock.super.use(pState, pLevel, pPos, pPlayer, pHand, pHit);
    }

    @Nullable
    @Override
    public MenuType<?> getMenuType(BlockState blockState, Level level, BlockPos pos) {
        return ModBlockEntities.MenuTypes.TREASURE_UPGRADE_MENU.get();
    }

    @Nullable
    @Override
    public BlockEntityType<TreasureUpgradeEntity> getBlockEntityType() {
        return ModBlockEntities.BlockEntities.TREASURE_UPGRADE_ENTITY.get();
    }
}
